<?php


class Login extends CI_Controller {
	
	function __construct(){
		parent::__construct();
	}

	function comprobar_login(){
		redirect('/login/formulario/','refresh');
	}
	
	function login_usuario(){
		$this->session->ultimo_acceso = round(microtime(true) * 1000);
		$mil = $this->session->ultimo_acceso;
		$seconds = $mil / 1000;
		$hora_actual = date('d/m/Y == H:i:s');
		$tiempo_caducidad = "";
		echo date("d-m-Y H:i:s", $seconds);
		//print_r($this->session);
	}
	
	function formulario(){
		print_r($this->session->all_userdata());
		$this->load->view('login/formulario');
	}
	
	function crear_usuario(){}
}

?>

